Skip to content

Feature/admin forth/1259/add delete many to dataapi#502

Merged
SerVitasik merged 6 commits intonextfrom
feature/AdminForth/1259/add-delete-many-to-dataapi
Mar 16, 2026
Merged

Feature/admin forth/1259/add delete many to dataapi#502
SerVitasik merged 6 commits intonextfrom
feature/AdminForth/1259/add-delete-many-to-dataapi

Conversation

@kulikp1
Copy link
Collaborator

@kulikp1 kulikp1 commented Mar 12, 2026

No description provided.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds a deleteMany method to AdminForth's data API layer, enabling bulk deletion of records by primary key across all supported database connectors (SQLite, PostgreSQL, MySQL, MongoDB, ClickHouse).

Changes:

  • Added deleteMany method to all five data connectors (SQLite, PostgreSQL, MySQL, MongoDB, ClickHouse) and to the type interfaces (IAdminForthDataSourceConnectorBase, IOperationalResource).
  • Added a new adminforth-auto-remove plugin reference in the dev-demo Taskfile.

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
adminforth/types/Back.ts Adds deleteMany to connector and operational resource interfaces
adminforth/dataConnectors/sqlite.ts Implements deleteMany using parameterized ? placeholders
adminforth/dataConnectors/postgres.ts Implements deleteMany using $N placeholders
adminforth/dataConnectors/mysql.ts Implements deleteMany using ? placeholders
adminforth/dataConnectors/mongo.ts Implements deleteMany using $in operator
adminforth/dataConnectors/clickhouse.ts Implements deleteMany with string-interpolated IDs
dev-demo/Taskfile.yaml Adds adminforth-auto-remove to the plugins list

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds a deleteMany method to the data API layer, enabling bulk deletion of records by primary key across all five database connectors (SQLite, PostgreSQL, MySQL, MongoDB, ClickHouse). It also registers a new adminforth-auto-remove plugin in the dev-demo task configuration.

Changes:

  • Added deleteMany implementations to all five data connectors (sqlite, postgres, mysql, mongo, clickhouse) for batch deletion by record IDs.
  • Declared deleteMany as an optional method on the IOperationalResource interface in Back.ts.
  • Added adminforth-auto-remove to the dev-demo plugin list.

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 7 comments.

Show a summary per file
File Description
adminforth/types/Back.ts Added optional deleteMany to IOperationalResource interface
adminforth/dataConnectors/sqlite.ts New deleteMany using parameterized IN (?) query
adminforth/dataConnectors/postgres.ts New deleteMany using parameterized IN ($1, $2, ...) query
adminforth/dataConnectors/mysql.ts New deleteMany using parameterized IN (?) query
adminforth/dataConnectors/mongo.ts New deleteMany using $in operator
adminforth/dataConnectors/clickhouse.ts New deleteMany using ALTER TABLE ... DELETE WHERE with named params
dev-demo/Taskfile.yaml Added adminforth-auto-remove to plugins list

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +1763 to +1764

deleteMany?(recordIds: any[]): Promise<number>;
Comment on lines +1763 to +1764

deleteMany?(recordIds: any[]): Promise<number>;
@SerVitasik SerVitasik merged commit 87682e1 into next Mar 16, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants